package com.a0soft.gphone.aTruffleHog.wnd.stat;

import android.content.Context;
import android.support.v4.app.Fragment;

import com.a0soft.gphone.aTruffleHog.R;

public class TopDeviceStatsPager extends BaseViewPager {
    private String[] m_strTitles;
    
    ////////////////////////////////////////
    @Override protected int
    GetViewPagerID()
    {
        return VIEW_PAGER_TOP_DEVICE_ID;
    }
    
    @Override protected String[] 
    GetTitles(Context ctx)
    {
        if (m_strTitles == null) {
            m_strTitles = new String[2];
            m_strTitles[0] = ctx.getString(R.string.stats_my_country);
            m_strTitles[1] = ctx.getString(R.string.stats_world);
        }
        return m_strTitles;
    }

    @Override protected Fragment 
    GetPage(Context ctx, int nPos)
    {
        return TopDeviceStatsFrg.NewInstance(
            nPos == 0 ? TopDeviceStatsFrg.TYPE_MY_COUNTRY : 
                        TopDeviceStatsFrg.TYPE_ALL_COUNTRIES);
    }
}
